<?php
	include_once("../common.php");

	if(!isVisitor() && isProgramChair($_SESSION['idusers'], $_GET['id'])){
		$c = connect();
		if($_GET['state']== "publish"){
			mysql_query("UPDATE submissions 
				SET status = 'Published' 
				WHERE articles_idarticles = '".$_GET['articleid']."' AND 
				events_idevents = '".$_GET['id']."'");
		}
		else{
			mysql_query("UPDATE submissions 
				SET status = 'Rejected' 
				WHERE articles_idarticles = '".$_GET['articleid']."' AND 
				events_idevents = '".$_GET['id']."'");
		}
	}

?>
